---@class ObjUtil
ObjUtil = {}

function ObjUtil.SetBuffIcon(buffId,iconGo,nameGo,desGo)
    local cfg = dataTable.getDataTableByStringId("t_skill",buffId)
    if cfg then
        if nameGo then
            nameGo.text = getLanguage(cfg.f_SkillName)
        end
        if desGo then
            desGo.text = getLanguage(cfg.f_Desc)
        end
        local scfg,infoId = logicMgr.SkillManager.getSkillInfoConfig(buffId)
        if scfg == nil then
            logError("找不到t_skillInfo id:"..tostring(infoId))
        elseif iconGo then
            iconGo.url = EnumConst.AtlasPath.SkillAtlas..scfg.f_SkillIcon
        end
    else
        logError("找不到t_skill id:"..tostring(buffId))
    end
end
---@param transform UnityEngine.Transform
---@return number,number,number x,y,z
function ObjUtil.GetLocalPosition(transform)
    return transform:GetLocalPosition(nil, nil, nil)
end
function ObjUtil.GetPosition(transform)
    return transform:GetPosition(nil, nil, nil)
end
function ObjUtil.GetLocalEulerAngles(transform)
    return transform:GetLocalEulerAngles(nil, nil, nil)
end
function ObjUtil.GetEulerAngles(transform)
    return transform:GetEulerAngles(nil, nil, nil)
end
function ObjUtil.GetLocalScale(transform)
    return transform:GetLocalPosition(nil, nil, nil)
end
function ObjUtil.TransformPoint(gObj,ptVec2,targetSpaceGObj)
    local x,y = Util.TransformPoint(gObj,ptVec2,targetSpaceGObj,nil,nil)
    return x,y
end

return ObjUtil